package com.aaa.service.impl;

import com.aaa.entity.OMS_Order;
import com.aaa.mapper.OMS_OrderMapper;
import com.aaa.service.OMS_OrderService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OMS_OrderServiceImpl extends ServiceImpl<OMS_OrderMapper, OMS_Order> implements OMS_OrderService {
    @Resource
    OMS_OrderMapper orderMapper;

    @Override
    public List<OMS_Order> Oms_orderBy(Integer orderSn, String createTime) {
        return orderMapper.Oms_orderBy(orderSn,createTime);
    }

    public List<OMS_Order> selectUserPage(Page<OMS_Order> page) {
//		调用Mapper接口返回一个page对象
        Page<OMS_Order> jobInfoPage = orderMapper.selectPage(page, null);
        //page对象转list对象
        List<OMS_Order> records = jobInfoPage.getRecords();
        return records;
    }
}
